package com.isoft.systemprovidor.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.isoft.systemprovidor.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysUserDao extends BaseMapper<SysUser> {

    /*无安全框架登录测试*/
    @Select("SELECT * FROM TMIM_SYSTEM.SYS_USER WHERE USERNAME =#{username} AND PASSWORD =#{password} AND ISLOCK = 0")
    public SysUser loginTest(@Param("username") String username , @Param("password") String password) ;

    /*获取所有用户信息*/
    @Select("SELECT * FROM TMIM_SYSTEM.SYS_USER")
    public List<SysUser> getAllSysUser();

    /*根据ID获取用户信息*/
    @Select("SELECT * from TMIM_SYSTEM.SYS_USER WHERE ID=#{id}")
    public SysUser getById(Integer id) ;


}
